// 引入createStore,专门用来是创建redux 中最为核心的strore对象   applyMiddleware是中转执行件,combineReducers,统计所有的reducer
import {createStore,applyMiddleware,combineReducers} from 'redux'
//引入为Count组件服务的reducer
import countReducer from "./reducers/count"
// 引入为person 组件服务的reducer
import personReducer from "./reducers/person"
// 引入redux-thunk,用关于支持异步action
import thunk from 'redux-thunk'
// 这里面的对象就是以后redux帮我们保存的对象，汇总所有的，变成总的传给store
const allReducer=combineReducers({
    count:countReducer,
    person:personReducer
})
const store=createStore(allReducer,applyMiddleware(thunk))
// 把store 暴露出去
export default store